#ifndef SUPERHEADER_H
#define SUPERHEADER_H

#include <QDebug>
#include <QVector>
#include <QHash>
#include <iostream>

using namespace std;

/*
  Структура входных данных задачи
*/
struct InputData {
  int             numberOfTerminals;  // число терминалов
  int             numberOfHubs;       // число концентраторов
  QVector<double> hubsCost;           // стоимость концентраторов
  QVector<int>    hubsCapacity;       // вместимость концентраторов
  QVector<double> matrixCostChannels; // матрица стоимостей линий связи

  InputData() :
    numberOfTerminals(/*9*/6),
    numberOfHubs(/*4*/3)
  {
    ++numberOfHubs; // + центральный узел

    hubsCost.fill(2.0, numberOfHubs);
    hubsCost[0] = 0.0; // центральный узел бесплатен

    hubsCapacity.fill(3, numberOfHubs);
    hubsCapacity[0] = numberOfTerminals; // центральный узел без ограничений

    // матрица стоимостей каналов
//    for (int i = numberOfTerminals * numberOfHubs; i > 0; --i) {
//      matrixCostChannels.append(rand() % 1000);
//    }
    matrixCostChannels.resize(numberOfTerminals * numberOfHubs);
    matrixCostChannels[0]  = 2.0, matrixCostChannels[1]  = 1.0, matrixCostChannels[2]  = 2.0, matrixCostChannels[3]  = 4.0,
    matrixCostChannels[4]  = 1.0, matrixCostChannels[5]  = 0.0, matrixCostChannels[6]  = 1.0, matrixCostChannels[7]  = 2.0,
    matrixCostChannels[8]  = 4.0, matrixCostChannels[9]  = 1.0, matrixCostChannels[10] = 2.0, matrixCostChannels[11] = 2.0,
    matrixCostChannels[12] = 1.0, matrixCostChannels[13] = 2.0, matrixCostChannels[14] = 1.0, matrixCostChannels[15] = 2.0,
    matrixCostChannels[16] = 2.0, matrixCostChannels[17] = 3.0, matrixCostChannels[18] = 2.0, matrixCostChannels[19] = 0.0,
    matrixCostChannels[20] = 4.0, matrixCostChannels[21] = 4.0, matrixCostChannels[22] = 3.0, matrixCostChannels[23] = 2.0;

//    matrixCostChannels[0]  = 2.0, matrixCostChannels[1]  = 3.0, matrixCostChannels[2]  = 6.0, matrixCostChannels[3]  = 1.0,
//    matrixCostChannels[4]  = 3.0, matrixCostChannels[5]  = 0.0, matrixCostChannels[6]  = 1.0, matrixCostChannels[7]  = 2.0,
//    matrixCostChannels[8]  = 5.0, matrixCostChannels[9]  = 3.0, matrixCostChannels[10] = 4.0, matrixCostChannels[11] = 3.0,
//    matrixCostChannels[12] = 2.0, matrixCostChannels[13] = 1.0, matrixCostChannels[14] = 4.0, matrixCostChannels[15] = 5.0,
//    matrixCostChannels[16] = 0.0, matrixCostChannels[17] = 5.0, matrixCostChannels[18] = 1.0, matrixCostChannels[19] = 6.0,
//    matrixCostChannels[20] = 1.0, matrixCostChannels[21] = 0.0, matrixCostChannels[22] = 7.0, matrixCostChannels[23] = 3.0;

//    matrixCostChannels[0]  = 3.0, matrixCostChannels[1]  = 5.0, matrixCostChannels[2]  = 2.0, matrixCostChannels[3]  = 1.0, matrixCostChannels[4]  = 4.0,
//    matrixCostChannels[5]  = 2.0, matrixCostChannels[6]  = 3.0, matrixCostChannels[7]  = 5.0, matrixCostChannels[8]  = 2.0, matrixCostChannels[9]  = 1.0,
//    matrixCostChannels[10] = 4.0, matrixCostChannels[11] = 5.0, matrixCostChannels[12] = 1.0, matrixCostChannels[13] = 1.0, matrixCostChannels[14] = 3.0,
//    matrixCostChannels[15] = 3.0, matrixCostChannels[16] = 6.0, matrixCostChannels[17] = 1.0, matrixCostChannels[18] = 2.0, matrixCostChannels[19] = 2.0,
//    matrixCostChannels[20] = 1.0, matrixCostChannels[21] = 4.0, matrixCostChannels[22] = 3.0, matrixCostChannels[23] = 4.0, matrixCostChannels[24] = 3.0,
//    matrixCostChannels[25] = 1.0, matrixCostChannels[26] = 2.0, matrixCostChannels[27] = 1.0, matrixCostChannels[28] = 2.0, matrixCostChannels[29] = 1.0,
//    matrixCostChannels[30] = 5.0, matrixCostChannels[31] = 4.0, matrixCostChannels[32] = 5.0, matrixCostChannels[33] = 2.0, matrixCostChannels[34] = 3.0,
//    matrixCostChannels[35] = 3.0, matrixCostChannels[36] = 1.0, matrixCostChannels[37] = 2.0, matrixCostChannels[38] = 1.0, matrixCostChannels[39] = 0.0,
//    matrixCostChannels[40] = 2.0, matrixCostChannels[41] = 0.0, matrixCostChannels[42] = 1.0, matrixCostChannels[43] = 1.0, matrixCostChannels[44] = 4.0;
  }
};

#endif
